import httpInstance from '@/utils/http.js'

export function getGoodsAPI (id) {
  return httpInstance({
    url: `/api/goods/info/${id}/`,

  })
}

export function getGoodsPicAPI (id) {
  return httpInstance({
    url: `/api/goods/goods-photos/${id}/thumbnail/ `,
    /* params:{
      id
    } */
  })
}


/**
 * 获取热榜商品
 * @param {Number} id - 商品id
 * @param {Number} type - 1代表24小时热销榜 2代表周热销榜
 * @param {Number} limit - 获取个数
 */
/* export const fetchHotGoodsAPI = ({ id, type, limit = 3 }) => {
  return httpInstance({
    url:'/api/goods/info/',
    params:{
      id, 
      type, 
      limit
    }
  })
} */
export const getchHotGoodsAPI = () => {
  return httpInstance({
    url:'/api/goods/info/',

  })
}